Using external resource dictionaries

Use external scopes when you want to be able to use the drop-down menus to select the resources from external resource dictionaries, but do not want to add them to the context of an object. This is useful when you use actions or application code to change the scene graph.

For example, a prefab defines its individual set of resources. When Kanzi instantiates the prefab as a part of the Screen object, all resources defined in the Screen’s resource dictionary become visible to the prefab. Having the Screen as an external resource dictionary for the prefab allows selecting the Screen’s resources as property values even when the prefab is edited outside the Screen’s context (the prefab template itself which is not under the Screen).

If a prefab instance is always instantiated inside a specific scene in a project, you can add that scene as an external resource dictionary.

Adding an external resource dictionary

To add an external resource dictionary to a node:

  1. If you do not have the Context Resources window open, select Window > Context Resources.

  2. In the Project select the node to which you want to add an external resource dictionary.
  3. In the Context Resources, click Add external scope, and select the node whose resource dictionary you want to add.
    When you add an external scope Kanzi Studio only lists in the resource selector drop-down menus the resources from the scope you added. Since Kanzi Studio does not make the resources available to your application you have to ensure that your application can reach during runtime the resources from the external scopes you added.

See also

Using local and global resources

Preloading resource dictionaries

Loading resources in parallel

Resources

Resource management